<?php include_once 'prepend.inc.php';?>
<div>
	<tr>
		<td>
		<?php 
				$today = QDateTime::Now();
				$dateDiff = $_ITEM->ReturnDate->Difference($today);
				

				if($dateDiff->Days <= 2 && $dateDiff->Days >= -10)
				{
					$status = 'KnobRed.png';
				}
				elseif($dateDiff->Days >= 3 && $dateDiff->Days <= 10)
				{
					$status = 'KnobOrange.png';
				}
				elseif($dateDiff->Days <= -10)
				{
					$status = 'BioHazard.png';
				}
				else
				{
					$status = 'KnobGreen.png';
				}
		?>
			<img src = '../assets/images/images/images/<?php _p($status)?>'>
		</td>
		<td><?php _p($_ITEM->FullName) ?></td>
		<td><?php _p($_ITEM->Email) ?></td>
		<td><?php _p($_ITEM->Title) ?></td>
		<td><?php _p($_ITEM->TakenDate) ?></td>
		<td><?php _p($_ITEM->ReturnDate) ?></td>
		<td><a href="sharedetails_edit.php/<?php _p($_ITEM->Id)?>">Edit</a></td>
	</tr>
</div>		
	
